function Person(){
	this.name="tommy";
}
function Dog(){

}
Dog.prototype=new Person();
var d=new Dog();
console.log(d.name);
console.log(d instanceof Person);